import request from '@/utils/request'


export default {
  // 医院列表
  getHospList(page, limit, searchObj) {
    return request({
      url: '/admin/hosp/hospital/list/' + page + '/' + limit,
      method: 'get',
      // 不是requestBody的post提交
      params: searchObj
    })
  },
  // 查询省
  findByDictCode(dictCode) {
    return request({
      url: '/admin/cmn/dict/findByDictCode/' + dictCode,
      method: 'get'
    })
  },
  // 根据id获取下面的市
  findChildId(id) {
    return request({
      url: '/admin/cmn/dict/findChildData/' + id,
      method: 'get'
    })
  },
  // 更新上线状态
  updateStatus(id,status) {
    return request({
      url: '/admin/hosp/hospital/updateHospStatus/' + id+'/'+status,
      method: 'get'
    })
  },
  // 根据id查询详情
  getHospById(id){
    return request({
      url: '/admin/hosp/hospital/showHospDetail/' + id,
      method: 'get'
    })
  },
  // 根据id查询详情
  getDeptByHoscode(hoscode){
    return request({
      url: '/admin/hosp/department/getDeptList/' + hoscode,
      method: 'get'
    })
  },
  getScheduleRule(page,limit,hoscode,deptcode){
    return request({
      url: '/admin/hosp/schedule/getScheduleRule/' + page+'/'+limit+'/'+hoscode+'/'+deptcode,
      method: 'get'
    })
  },
  getScheduleDetail(hoscode,deptcode,workDate){
    return request({
      url: '/admin/hosp/schedule/getScheduleDetail/'+hoscode+'/'+deptcode+'/'+workDate,
      method: 'get'
    })
  }
}
